<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心_{$webname}</title>
<meta name='keywords'    content='{$keywords}'>
<meta name='description' content='{$description}'>
<!--公共样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/reset.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/common.css" />
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome.min.css" />
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Plugins/FontAwesome/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--公共样式结束-->
<!--页面样式开始-->
<link rel="stylesheet" type="text/css" href="{$NOW_THEME_URL}/Assets/Css/page_member.css" />
<link href="__PUBLIC__/Plugins/Validform/css/validform.css" rel="stylesheet" />
<!--页面样式结束-->
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/Js/jquery.SuperSlide.2.1.1.js"></script>
</head>

<body>
	<div class="zhezhao"></div>
<div class="zz">
	<!--top start-->
	<include file="Public:header" lang="true" />
	<!--top end-->
	<!--content start-->
	<div class="content clearfix">
		<div class="member_left">
			<ul>
				<li><a href="{:U('Member/index')}" class="hover color_main"><i class=" icon-user"></i>个人信息</a></li>
				<li><a href="{:U('Member/order_index')}" class="color_main"><i class=" icon-file"></i>我的订单</a></li>
				<li><a href="{:U('Member/address_index')}" class="color_main"><i class=" icon-list"></i>我的地址</a></li>
				<li><a href="{:U('Member/changePassword')}" class="color_main"><i class=" icon-unlock"></i>修改密码</a></li>
			</ul>
		</div>
		<!--member_right start-->
		<div class="member_right">
			<div class="mr_title color_main">个人信息</div>
			<form id="formTable">
			<input type="hidden" name="id" value="{$user.id}" />
				<table class="lotab">
					<tbody>
					<tr>
						<th>&nbsp;</th>
						<td><div class="" id="Validform_errortip_div"></div></td>
					</tr>
					<tr>
						<th><label for="email">电邮：</label></th>
						<td>{$user.email}</td>
					</tr>
					<tr>
						<th><label for="username">性别：</label></th>
						<td>
							<input type="radio" id="sex" value="1" name="sex" <eq name='user.sex' value='1'>checked</eq>/>先生&nbsp;&nbsp;&nbsp;
							<input type="radio" id="sex" value="2" name="sex" <eq name='user.sex' value='2'>checked</eq>/>女士
						</td>
					</tr>
					<tr>
						<th><label for="username">姓名：</label></th>
						<td>
							<input type="text" id="realname" value="{$user.realname}" name="realname" class="myinput" placeholder="请输入收件人姓名" datatype="*" nullmsg="请输入收件人姓名" errormsg="姓名输入不正确" />
						</td>
					</tr>
					<tr>
						<th><label for="mobile">手机号码：</label></th>
						<td>
							<input type="text" id="mobile" value="{$user.mobile}" name="mobile" class="myinput" placeholder="请输入您的手机号码" datatype="m" nullmsg="请输入您的手机号码" errormsg="手机号码输入不正确" />
						</td>
					</tr>
					<tr>
						<th><label for="qq">固定电话：</label></th>
						<td>
							<input type="text" id="phone" value="{$user.phone}" name="phone" class="myinput" placeholder="请输入您的固定电话" />
						</td>
					</tr>
					<tr>
						<th><label for="qq">备注：</label></th>
						<td>
							<textarea name="remark" id="remark" placeholder="请输入您的喜好禁忌" class="myinput" style="width:420px;height:140px;">{$user.remark}</textarea>
						</td>
					</tr>
					<tr>
						<th></th>
						<td>
							<input type="button" value="确认"  class="btn_login" id="form_ele_submit" />
							<input type="reset"  value="重置" class="btn_login reset" />
						</td>
					</tr>
					</tbody>
				</table>
			</form>
		</div>
		<!--member_right end-->
	</div>
	<!--content end-->
	
	<!--footer start-->
	<include file="Public:footer" lang="true" />
	<!--footer end-->
</div>
<script src="__PUBLIC__/Plugins/Validform/validform.min.js" ></script>
<script type="text/javascript">	
$(function(){
	
	$("#formTable").Validform({tiptype:function(msg,o,cssctl){
		var objtip=$("#Validform_errortip_div");cssctl(objtip,o.type);objtip.text(msg);}
		,tipmsg:{
				tit:"Prompt information",
				w:"Please input the correct information！",
				r:"信息验证通过！",
				c:"Checking information…",
				s:"Please fill in the information！",
				v:"The filled information has not been verified, please try later…",
				p:"Data are presented…",
				err:"Wrong! To address or return data format is wrong！",
				abort:"Ajax operation was canceled！"
		},
		
	});
	//表单提交
	 $('#form_ele_submit').on('click',function(){
		
		var postData = {};
		postData = $("#formTable").serialize();
		$.post("{:U('Member/index')}", postData , function(data){
			if(data.status==1){
				alert("修改成功!");
			}else{
				tip();
				alert("修改失败，请稍后重试!");
			}
		}, "json");
	}); 
	
	//悬浮框显示隐藏
	$('.online').on('hover',function(){
		$('.online ul').toggle();
		//$('.rlico').toggleClass('rlico2');
	});
	
	
});

	function tip(){
	
		$("#Validform_errortip_div").removeClass('Validform_right');
		$("#Validform_errortip_div").addClass('Validform_wrong');
	}  

</script>	
</body>
</html>
